FROM 192.168.5.101:8083/centos7/jdk8

VOLUME /tmp

ADD target/sf-edge-service-1.1.0-SNAPSHOT.jar /data/service.jar

COPY target/lib/ /data/lib/

RUN sh -c 'touch /data/service.jar'

# 开启远程调试 -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000

ENV JAVA_OPTS="-Xms256m -Xmx512m"
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone


ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /data/service.jar"]